/*
 * @Author: 梦付千秋星垂野 465943794@qq.com
 * @Date: 2022-10-09 15:27:48
 * @LastEditors: 梦付千秋星垂野 465943794@qq.com
 * @LastEditTime: 2022-10-09 16:17:15
 * @FilePath: /practise--chat-app-react-nodejs/server/learn_express/3_express_route_moudule.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express')
const app = express()

// app.use('/files', express.static('./files'))

// 1. 导入路由模块
const router = require('./03.router')
// 2. 注册路由模块
// app.use('/api', router)
app.use(router)
// 注意： app.use() 函数的作用，就是来注册全局中间件

app.listen(8002, () => {
  console.log('http://127.0.0.1')
})
